Gitolite - Setup
2013/03/06 |
Install Gitolite that manages Git Repositories.
|
|
[1] | Install Gitolite |
[root@www ~]# yum --enablerepo=epel -y install gitolite # install from EPEL
|
[2] | create SSH keys for Gitolite admin and Setup with it. |
[root@www ~]#
su - gitolite
-sh-4.1$
ssh-keygen -t rsa -f ~/.ssh/gitadmin Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): # set passphrase Enter same passphrase again: # confirm Your identification has been saved in ./.ssh/gitadmin. Your public key has been saved in ./.ssh/gitadmin.pub. The key fingerprint is: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx gitolite@www.srv.world The key's randomart image is:
-sh-4.1$
gl-setup ~/.ssh/gitadmin.pub The default settings in the rc file (/var/lib/gitolite/.gitolite.rc) are fine for most people but if you wish to make any changes, you can do so now.
hit enter...
# Enter # the gitolite.rc file opens, then close with no edit
-sh-4.1$
vi ~/.ssh/config # create new host GitServer # any name you like user gitolite hostname 10.0.0.31 # Git server's hostname or IP address port 22 identityfile ~/.ssh/gitadmin # specify private key
-sh-4.1$
chmod 600 ~/.ssh/config -sh-4.1$ git config --global user.name "gitolite" -sh-4.1$ git config --global user.email "gitolite@srv.world"
# clone "gitolite-admin" repository to finish setup -sh-4.1$ git clone ssh://GitServer/gitolite-admin Initialized empty Git repository in /var/lib/gitolite/gitolite-admin/.git/ remote: Counting objects: 6, done. remote: Compressing objects: 100% (4/4), done. remote: Total 6 (delta 0), reused 0 (delta 0) Receiving objects: 100% (6/6), done. |